//
//  MyInfoModel.m
//  Mtime2.0
//
//  Created by 凉气的Mac on 16/9/22.
//  Copyright © 2016年 凉气的Mac. All rights reserved.
//

#import "MyInfoModel.h"

@implementation MyInfoModel

+(instancetype)myInfoModelWithDict:(NSDictionary *)dict{

    MyInfoModel *model = [[MyInfoModel alloc]init];
    
    [model setValuesForKeysWithDictionary:dict];
    
    return model;

}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
}

+(NSArray *)myInfoModel{

    NSArray *array = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Setting.plist" ofType:nil]];
    
    NSMutableArray *muArray = [NSMutableArray array];
    
    [array enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        
        MyInfoModel *model = [MyInfoModel myInfoModelWithDict:obj];
        
        [muArray addObject:model];
        
    }];

    return muArray.copy;
}

@end

















